package pl.agh.pp.zephyr.utils.parser;

import pl.agh.pp.zephyr.utils.parser.MCUStatus.Client;
import pl.agh.pp.zephyr.utils.parser.MCUStatus.Room;

public class ParserTester {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// Vector<String> nodes = HTMLParser
		// .getTableString("D:\\Work\\PP\\example.html");
		// .getTable("http://localhost:1420/Status");
		// for(String node: nodes) {
		// System.out.println("Node:");
		// System.out.println(node);
		// System.out.println("-------------");
		// }
		// System.out.println(HTMLParser.getStatusTableString("D:\\Work\\PP\\example.html"));
		// String[] statusTableStringArray = HTMLParser
		// .getStatusTableStringArray("D:\\Work\\PP\\example.html");
		// for(String s: statusTableStringArray) {
		// System.out.println("Cell: " + s);
		// System.out.println("-------------");
		// }
		MCUStatus mcuStatus = HTMLParser
				.getMCUStatus("D:\\Work\\PP\\example.html");
		for (Room room : mcuStatus.getRooms()) {
			System.out.println("Room Name: " + room.getRoomName());
			for (Client client : room.getClients()) {
				System.out.println("\tClient Name: " + client.getClientName());
				System.out.println("\t - Duration:\t\t\t" + client.getDuration());
				System.out.println("\t - Codec:\t\t\t" + client.getCodec());
				System.out.println("\t - RTP Packets/Bytes tx:\t"
						+ client.getRtpPacketsBytestx());
				System.out.println("\t - RTP Packets/Bytes rx:\t"
						+ client.getRtpPacketsBytesrx());
				System.out.println();
			}
			System.out.println("-----------------------------");
		}
	}
}
